<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="wIdth=device-wIdth, initial-scale=1.0">
  <title>Document</title>
  <script src="../dist/djj-utils.js"></script>
</head>
<body>
  
  <script>
    console.log(djutils.randomString(4))
    console.log(djutils.randomRegionNum(1, 4))

    let list = [
      { Id: '1', name: '11', ParentId: '' },
      { Id: '2', name: '11-1', ParentId: '1' },
      { Id: '3', name: '11-2', ParentId: '1' },
      { Id: '33', name: '11-2-1', ParentId: '3' },
      { Id: '4', name: '22', ParentId: '' },
      { Id: '5', name: '33', ParentId: '' },
      { Id: '6', name: '33-1', ParentId: '5' },
    ]
    let tree = djutils.arrayListToTree('', list, 'Children', "Id", "ParentId")
    console.log(tree);
    let tree2 = djutils.deepClone(tree)
    tree2[1].name = 'dddd'
    console.log('tree2', tree2)
    console.log(djutils.arrayTreeToList(tree, 'Children'));
    console.log(djutils.isPhone(18208532022));
    let obj1 = djutils.stringUrlToObj('aaa?a=zhangs&name=19')
    console.log(obj1);
    console.log(djutils.objectObjToParams(obj1));
  </script>
</body>
</html>